package com.example.hosptialtag.controller;

import com.example.hosptialtag.service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

/**
 * @Author liuyuhao&caiang
 * @Date 2022/2/21
 */

@Controller
public class DoctorController {
    @Autowired
    private DoctorService doctorService;
    @RequestMapping("/register")
    public String register(){
        return "register";
    }
    @RequestMapping("/login")
    public String login(){
        return "login";
    }
    @RequestMapping("/main")
    public String main(){
        return "main";
    }
    @RequestMapping("/loginDoctor") // 医护人员登录
    public String loginDoctor(String name, String password, Model model, HttpSession session) {
        return doctorService.loginDoctor(name, password, model, session);
    }
}
